Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Godzio 15 */
- #include <stdio.h>
- void CAPSLOCK(char str[]) {
- int i;
- for (i=0; str[i]; i++)
- if ('a' <= str[i] && str[i] <= 'z')
- str[i] -= 0x20;
- }
- int main (void) {
- char lancuch[] = "Przykladowy lancuch tekstowy";
- puts("Lancuch przed zmianami:");
- puts(lancuch);
- CAPSLOCK(lancuch);
- puts("Lancuch po zmianach:");
- puts(lancuch);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment